<%= search_form_for @q, url: ruiqu_store_orders_path, html: {class: "form-horizontal ui-box list-filter-form js-store-orders-form"} do |f| %>
  <div class="clearfix">
    <div class="filter-groups">
      <div class="control-group">
        <label class="control-label">
          <label class="control-label">订单号：</label>
        </label>
        <div class="controls" >
          <input id="order_num" type="text" value="<%= @numero%>" name="q[numero_cont]" class="js-order-text" value="">
        </div>
      </div>

      <div class="filter-groups">
        <div class="control-group">
          <label class="control-label">手机号：</label>
          <div class="controls">
            <input type="text" name="q[phone_number_cont]" class="js-express-select" value="<%= @phone_number%>">
          </div>
        </div>
      </div>

      <div class="control-group">
        <label class="control-label">单位名称：</label>
        <div class="controls">
          <input type="text" name="q[company_name_cont]" value="<%= @company_name %>" class="js-feeback-select">
        </div>
      </div>
    </div>

    <div class="pull-left">
      <div class="time-filter-groups clearfix">
        <div class="control-group">
          <label class="control-label">下单时间：</label>
          <div class="controls" >
            <input type="text" name="q[created_at_gteq]" value="<%= @start %>" id="start_time" class="dateTimePicker">
            <span>至</span>
            <input type="text" name="q[created_at_lteq]" value="<%= @end %>" id="end_time" class="dateTimePicker">
          </div>
        </div>
      </div>
      <div class="filter-groups">
        <div class="control-group">
          <label class="control-label">订单状态：</label>
          <div class="controls">
            <select name="q[status_eq]" class="js-state-select" id="order_status">

            <option value="">全部</option>

            <option value="0" <%= 'selected' if @status == "0"%> >未确认</option>

            <option value="1" <%= 'selected' if @status == "1"%> >已确认</option>

            <option value="2" <%= 'selected' if @status == "2"%> >处理中</option>

            <option value="3" <%= 'selected' if @status == "3"%> >邮寄中</option>

            <!-- <option value="4">已完成</option> -->
            <option value="5" <%= 'selected' if @status == "5"%> >已取消</option>
            </select>
          </div>
        </div>
        <div class="control-group">
          <label class="control-label">支付状态：</label>
          <div class="controls">
            <select name="q[pay_status_eq]" class="js-buyway-select" id="pay_status">

            <option value="">全部</option>

            <option value="0" <%= 'selected' if @pay_status == "0"%> >未支付</option>

            <option value="1" <%= 'selected' if @pay_status == "1"%> >已支付</option>

            </select>
          </div>
        </div>
      </div>

    </div>
  </div>

  <div class="control-group" style="margin-left: 120px;">
    <div class="controls">
      <div class="ui-btn-group">
        <button type="submit" name="button" style="margin-left: -60px;" class="ui-btn ui-btn-primary js-filter">筛选</button>
        <!-- <button type="submit" class="ui-btn js-export ">批量导出</button> -->
      </div>
    </div>
  </div>
<% end %>
